import time
def идитедалеко(array):
    for i in range(len(array)-1):
        for j in range(i+1, len(array)):
            if array[1]>= a[j]:
                t=array[j]
                array[j]=array[i]
                array[i]=t
a=[int(i) for i in open('m1_sorted.txt')]
b=[int(i) for i in open('m2_reverse.txt')]
c=[int(i) for i in open('m3_shuffle.txt')]
start=time.time()
идитедалеко(a)
finish=time.time()
print("m1_sorted", round((finish-start)*1000), "milliseconds")
start=time.time()
идитедалеко(b)
finish=time.time()
print("m2_reverse", round((finish-start)*1000), "milliseconds")
start=time.time()
идитедалеко(c)
finish=time.time()
print("m3_shuffle", round((finish-start)*1000), "milliseconds")
